package com.dt76.smallloanbackenduser.controller.ysy;

import com.dt76.smallloanbackenduser.remote.ysy.InOutRemote;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/ysy")
public class InOutController {
    @Autowired
    private InOutRemote inOutRemote;
    @RequestMapping("/inOut")
    public String account2(Model model) {
        model.addAttribute("inoutList", inOutRemote.qryAll());
        return "pages/ysy/inOut";
    }
    @RequestMapping("/delInout/{rId}")
    @ResponseBody
    public Result delInout(@PathVariable String rId){
        return inOutRemote.delInout(Integer.parseInt(rId));
    }
}
